package gold.contest;

import gold.utils.InputUtil;

import java.util.*;

/**
 * Created by fanzhenyu02 on 2021/12/10.
 * common problem solver template.
 */
public class LC6016 {
    public long startExecuteTime = System.currentTimeMillis();


    class Solution {
        public List<String> cellsInRange(String s) {
            List<String> ans = new ArrayList<>();
            char colStart = s.charAt(0), colEnd = s.charAt(3);
            int rowStart = s.charAt(1) - '0', rowEnd = s.charAt(4) - '0';
            for (char i = colStart; i <= colEnd; i++) {
                for (int j = rowStart; j <= rowEnd; j++) {
                    ans.add(i + String.valueOf(j));
                }
            }

            return ans;
        }
    }

    public void run() {
        Solution solution = new Solution();
        System.out.println(solution.cellsInRange("K1:L2"));
        System.out.println(solution.cellsInRange("A1:F1"));
    }

    public static void main(String[] args) throws Exception {
        LC6016 an = new LC6016();
        an.run();

        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
